From 899ed5e58e937da3056cce68c56501b49b468597 Mon Sep 17 00:00:00 2001 From: Ryan Kaldari Date: Mon, 4 Jul 2011 21:30:09 +0000 Subject: [PATCH] better fix for bug 27338 - doesnt rely on line-height --- includes/ImageGallery.php | 5 +---- skins/common/shared.css | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 920ef059fb..5c2ed89fe3 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -281,10 +281,7 @@ class ImageGallery { $thumbhtml = "\n\t\t\t" . '
' . htmlspecialchars( $img->getLastError() ) . '
'; } else { - # We get layout problems with the margin, if the image is smaller - # than the line-height (17), so we add less margin in these cases. - $minThumbHeight = $thumb->height > 17 ? $thumb->height : 17; - $vpad = ( self::THUMB_PADDING + $this->mHeights - $minThumbHeight ) /2; + $vpad = ( self::THUMB_PADDING + $this->mHeights - $thumb->height ) /2; $imageParameters = array( 'desc-link' => true, diff --git a/skins/common/shared.css b/skins/common/shared.css index d1248604e4..493bbab16f 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -561,6 +561,11 @@ li.gallerybox div.thumb { margin: 2px; } +li.gallerybox div.thumb img { + display: block; + margin: 0 auto; +} + div.gallerytext { overflow: hidden; font-size: 94%; -- 2.20.1